// --------------------------------------------------------------------------------------------------------------------
// <copyright file="JsonTypeAttribute.cs" company="Roman '4ux-nbIx' Novitsky">
//   Copyright (c) Roman '4ux-nbIx' Novitsky 2010
// </copyright>
// <summary>
//   Defines the JsonTypeAttribute type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Json
{
    #region Namespace Imports

    using System;

    #endregion


    /// <summary>
    /// Defines Json type attribute.
    /// </summary>
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
    public class JsonTypeAttribute : Attribute
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="JsonTypeAttribute"/> class.
        /// </summary>
        /// <param name="type">
        /// The member type.
        /// </param>
        public JsonTypeAttribute(Type type)
        {
            Type = type;
        }

        #endregion


        #region Properties

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>
        /// The type name.
        /// </value>
        public string Name
        {
            get;
            set;
        }

        /// <summary>
        /// Gets the member type.
        /// </summary>
        /// <value>
        /// The member type.
        /// </value>
        public Type Type
        {
            get;
            private set;
        }

        #endregion
    }
}